﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BLL;
namespace 健身房管理
{
    
    public partial class UserConsume : UserControl
    {
        huiyuanBLL hyb = new huiyuanBLL();
         public  string toux ="";
        public UserConsume()
        {
            InitializeComponent();
        }

        private void UserConsume_Load(object sender, EventArgs e)
        {
             
            //Image im = Image.FromStream(WebRequest.Create("http://q2.qlogo.cn/headimg_dl?dst_uin=2244727152&spec=100").GetResponse().GetResponseStream());
            //pictureBox1.Image = im;
            //pictureBox1.Load("http://q2.qlogo.cn/headimg_dl?dst_uin=2244727152&spec=100");
            viewyh();
            viewcarnum();
            viewshour();
            DateTime dt = DateTime.Now;
            label12.Text = dt.Month.ToString()+"月";
        }
        public void viewyh() //用户数量
        {
            DataTable dt = hyb.view();
            this.lblyhsl.Text = dt.Rows.Count.ToString();
            yhslcir.Value= int.Parse(dt.Rows.Count.ToString());
            this.Tyhsl.Value= int.Parse(dt.Rows.Count.ToString());
        }
        public void viewcarnum() //累计用户卡数量
        {
            DataTable dt = hyb.viewcarnum();
            this.lblljcardr.Text = dt.Rows[0]["xx"].ToString();
            this.cardcir.Value = int.Parse(dt.Rows[0]["xx"].ToString());
            Tcard.Value = int.Parse(dt.Rows[0]["xx"].ToString());
            
        }

        public void viewshour()
        {
            lblljsr.Text = (Tcard.Value * 2).ToString();
            Tljsr.Value = Tcard.Value * 2;
        }
        private void label20_Click(object sender, EventArgs e)
        {

        }

    }
}
